using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Keleyi.Com.EFDAL.Models.Mapping
{
    public class keleyi_messageMap : EntityTypeConfiguration<Keleyi.Com.Model.MessageInfo>
    {
        public keleyi_messageMap()
        {
            // Primary Key
            this.HasKey(t => t.kID);

            // Properties
            this.Property(t => t.kContent)
                .HasMaxLength(2000);

            this.Property(t => t.kTitle)
                .HasMaxLength(100);

            this.Property(t => t.kEmail)
                .HasMaxLength(100);

            this.Property(t => t.kQQ)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("keleyi_message");
            this.Property(t => t.kID).HasColumnName("kid");
            this.Property(t => t.kAddtime).HasColumnName("kaddtime");
            this.Property(t => t.kContent).HasColumnName("kcontent");
            this.Property(t => t.kTitle).HasColumnName("ktitle");
            this.Property(t => t.kEmail).HasColumnName("kemail");
            this.Property(t => t.kQQ).HasColumnName("kqq");
            this.Property(t => t.kIsshow).HasColumnName("kisshow");
        }
    }
}
